home *** CD-ROM | disk | FTP | other *** search
- Path: qcd.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: How to RUN a program in Unix?
- Date: 5 Jan 1996 14:47:51 GMT
- Organization: Los Alamos National Laboratory
- Distribution: world
- Message-ID: <4cjdmn$fk5@newshost.lanl.gov>
- References: <4ciiip$150@elaine37.Stanford.EDU>
- NNTP-Posting-Host: qcd.lanl.gov
-
- In article <4ciiip$150@elaine37.Stanford.EDU>, magical@leland.Stanford.EDU
- (Alexander Y. Lin) writes:
- <snip>
- |> Now I'm trying to run the progtest program to see if it works! But I can't
- |> for my life figure out how! I tried to gdb progtest and then type run, but
- |> it just says "program exited normally" without the output. (progtest
- |> prints a lits of words to stdout.)
-
- Most likely that it doesn't! It seems like you have a valid program which
- does absolutely nothing :-) (Or maybe it did do something, like writing out a
- file, which you did not notice).
-
- First rule for a beginner: _Never_ assume you know where the problem is. Post
- a _small_ _complete_ example, describe what you did, what you expected and
- what happened.
-
- |>
- |> So my question is, how to run a gcc/makefile compiled program? Also,
-
- Depends on the system. On Unix, just name the program: say `progtest'.
-
- |> I understand the .o are object files, but what is progtest*?
-
- You need help from some elementary book on the system you are running on: I
- strongly suggest you do so immediately. I am assuming you are using some
- version of Unix, and that the listing was produced by a command equivalent to
- `ls -F'. In that case, _you_ have requested (unknowningly of course) to mark
- all executable files with a trailing *, all directories with a trailing /
- etc. (In priniciple it is possible that the Makefile really generated
- something called 'progtest*', but I find that highly unlikely).
-
- Note that the object files are not executable: they need to be `linked'
- together with libraries to be runnable. Only the final result of the linking
- is.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-